<?php

require_once("core.php");

if(!isset($_GET['id'])) {
	header("HTTP/1.1 403 Forbidden" );
	exit;
}
else {
	$bdd = mysql_pdo_init();
	$res = $bdd->query("SELECT `pub`.`pub_url_click` FROM `pub` WHERE `pub`.`pub_id` = " . $_GET['id'])->fetch(PDO::FETCH_ASSOC);
	header('Location: http://' . $res['pub_url_click']);
}